
package com.dhcc.bpm.modules.orga.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.Excel;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;

/**
 * @ClassName App
 * @Description 应用/渠道信息 实体类
 * @Author daina
 * @Date 2020/2/24 19:25
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 */
@Data
@TableName("opc_app")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "App对象", description = "应用/渠道信息")
public class App extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 机构ID (关联opc_orga表ID)
     */
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    @ApiModelProperty(value = "机构ID (关联opc_orga表ID)")
    private Long opcOrgaId;
    /**
     * 渠道名称
     */
    @ApiModelProperty(value = "渠道名称")
    @Excel(name = "渠道名称")
    private String appName;
    /**
     * 渠道类型
     */
    @ApiModelProperty(value = "渠道类型")
    @Excel(name = "渠道类型")
    private String appType;
    /**
     * 渠道功能
     */
    @ApiModelProperty(value = "渠道功能")
    private String appFun;
    /**
     * 渠道申请时间
     */
    @ApiModelProperty(value = "渠道申请时间")
    private String appApplyTime;
    /**
     * 渠道状态
     */
    @ApiModelProperty(value = "渠道状态")
    @Excel(name = "审批状态")
    private String appState;
    /**
     * 负责人
     */
    @ApiModelProperty(value = "负责人")
    @Excel(name = "负责人")
    private String perCharge;
    /**
     * 负责人电话
     */
    @ApiModelProperty(value = "负责人电话")
    @Excel(name = "负责人电话")
    private String prpTel;
    /**
     * 有效时间
     */
    @ApiModelProperty(value = "有效时间")
    private String appValidTime;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
//    @TableField(value = "`describe`")
    private String describe;
    /**
     * 机构名称
     */
    @ApiModelProperty(value = "机构名称")
    @Excel(name = "机构名称")
    private String orgaName;
    /**
     * 机构代码
     */
    @ApiModelProperty(value = "机构代码")
    private String orgaCode;
    /**
     * 渠道范围
     */
    @ApiModelProperty(value = "渠道范围")
    private String appRange;
    /**
     * 渠道流量
     */
    @ApiModelProperty(value = "渠道流量")
    private String appFlow;
    /**
     * 渠道编号
     */
    @ApiModelProperty(value = "渠道编号")
    private String appId;
    /**
     * 渠道密钥
     */
    @ApiModelProperty(value = "渠道密钥")
    private String appSecret;
    /**
     * 开放等级
     */
    @ApiModelProperty(value = "开放等级")
    private String scope;
    /**
     * 令牌有效期
     */
    @ApiModelProperty(value = "令牌有效期")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long tokenOverTime;
    /**
     * 访问令牌有效期
     */
    @ApiModelProperty(value = "访问令牌有效期")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long tokenValidTime;
    /**
     * 刷新令牌有效期
     */
    @ApiModelProperty(value = "刷新令牌有效期")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long tokenRefreshTime;
    /**
     * 公钥
     */
    @ApiModelProperty(value = "公钥")
    private String publicKey;
    /**
     * 私钥
     */
    @ApiModelProperty(value = "私钥")
    private String privateKey;
    /**
     * 加密方式 （RSA）
     */
    @ApiModelProperty(value = "加密方式 （RSA）")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long encrypType;
    /**
     * 密钥用途 (生产、测试、准生产)
     */
    @ApiModelProperty(value = "密钥用途 (生产、测试、准生产)")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long keyUsage;
    /**
     * 父ID (新增机构pid为0，变更机构为被变更机构id)
     */
    @ApiModelProperty(value = "父ID (新增机构pid为0，变更机构为被变更机构id)")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long pid;
    /**
     * 操作类型 (1.接入；2.变更)
     */
    @ApiModelProperty(value = "操作类型 (1.接入；2.变更)")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long operationType;
    /**
     * 备用1
     */
    @ApiModelProperty(value = "备用1")
    private String spare1;
    /**
     * 备用2
     */
    @ApiModelProperty(value = "备用2")
    private String spare2;
    /**
     * 备用3
     */
    @ApiModelProperty(value = "备用3")
    private String spare3;
    /**
     * 备用4
     */
    @ApiModelProperty(value = "备用4")
    private String spare4;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private String tenantId;

    /**
     * 授权类型
     */
    @ApiModelProperty(value = "授权类型")
    private String authorizedGrantTypes;
    /**
     * 回调地址
     */
    @ApiModelProperty(value = "回调地址")
    private String webServerRedirectUri;

    /**
     * 自动授权
     */
    @ApiModelProperty(value = "自动授权")
    private String autoapprove;

    /**
     * 测试公钥
     */
    @ApiModelProperty(value = "测试公钥")
    private String testPublicKey;
    /**
     * 测试私钥
     */
    @ApiModelProperty(value = "测试私钥")
    private String testPrivateKey;
    /**
     * 环境
     */
    @ApiModelProperty(value = "环境")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long env;

    /**
     * 测试环境-应用编码
     */
    @ApiModelProperty(value = "测试编码")
    private String testAppId;

    /**
     * 测试环境-应用秘钥
     */
    @ApiModelProperty(value = "测试编码")
    private String testAppSecret;
    /**
     * 测试环境-令牌有效期
     */
    @ApiModelProperty(value = "令牌有效期")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long testTokenOverTime;
    /**
     * 测试环境-开放等级
     */
    @ApiModelProperty(value = "测试开放等级")
    private String testScope;
    /**
     * 测试环境-访问令牌有效期
     */
    @ApiModelProperty(value = "访问令牌有效期")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long testTokenValidTime;
    /**
     * 测试环境-刷新令牌有效期
     */
    @ApiModelProperty(value = "刷新令牌有效期")
    @JsonSerialize(
            using = ToStringSerializer.class,
            nullsUsing = NullSerializer.class
    )
    private Long testTokenRefreshTime;
    /**
     * 刷新状态
     */
    private String refreshStatus;

    /**
     * 刷新状态
     */
    private String payMoney;

    /**
     * 刷新状态
     */
    private String payLanguage;

    /**
     * 刷新状态
     */
    private String payMent;

    /**
     * 刷新状态
     */
    @Excel(name ="启用状态")
    private String appStatus;

    /**
     * 正式环境加密公钥
     */
    @ApiModelProperty(value = "正式环境加密公钥")
    private String publicEncryptKey;
    /**
     * 正式环境加密私钥
     */
    @ApiModelProperty(value = "正式环境加密私钥")
    private String privateEncryptKey;
    /**
     * 测试环境加密公钥
     */
    @ApiModelProperty(value = "测试环境加密公钥")
    private String testPublicEncryptKey;
    /**
     * 测试环境加密私钥
     */
    @ApiModelProperty(value = "测试环境加密私钥")
    private String testPrivateEncryptKey;
    /**
     * 联系人邮箱
     */
    @ApiModelProperty(value = "联系人邮箱")
    private String prpEmail;
    /**
     * 审批意见
     */
    @ApiModelProperty(value = "审批意见")
    private String approveOpinion;
    /**
     * 导出数据标识
     */
    @ApiModelProperty(value = "导出数据标识")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String expSeq;
    /**
     * 有效期天数
     */
    @ApiModelProperty(value = "有效期天数")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String expire;
    /**
     * 有效期结束时间
     */
    @ApiModelProperty(value = "有效期结束时间")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String expireDate;
    /**
     * 测试环境有效期天数
     */
    @ApiModelProperty(value = "测试环境有效期天数")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testExpire;
    /**
     * 测试环境有效期结束时间
     */
    @ApiModelProperty(value = "测试环境有效期结束时间")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testExpireDate;
    /**
     * 安全方式
     */
    @ApiModelProperty(value = "安全方式")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String safeMode;
    /**
     * 加密机秘钥名称
     */
    @ApiModelProperty(value = "加密机秘钥名称")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String encryptKeyName;
    /**
     * 加密机签名秘钥名称
     */
    @ApiModelProperty(value = "加密机签名秘钥名称")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String signKeyName;
    /**
     * 测试环境加密机秘钥名称
     */
    @ApiModelProperty(value = "测试环境加密机秘钥名称")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testEncryptKeyName;
    /**
     * 测试环境加密机签名秘钥名称
     */
    @ApiModelProperty(value = "测试环境加密机签名秘钥名称")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testSignKeyName;

    /**
     * 提前提示天数
     */
    @ApiModelProperty(value = "提前提示天数")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String promptTime;

    /**
     * 测试环境提前提示天数
     */
    @ApiModelProperty(value = "测试环境提前提示天数")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testPromptTime;

    /**
     * 是否进行时间戳校验,1:校验,2:不校验
     */
    @ApiModelProperty(value = "是否进行时间戳校验")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String isVerifyTimestamp;


    /**
     * 渠道接入类型
     */
    @ApiModelProperty(value = "渠道接入类型")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String accessType;

    /**
     * 签名公钥证书
     */
    @ApiModelProperty(value = "签名公钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String publicSignCert;

    /**
     * 加密公钥证书
     */
    @ApiModelProperty(value = "加密公钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String publicEncyptCert;

    /**
     * 测试签名公钥证书
     */
    @ApiModelProperty(value = "测试签名公钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testPublicSignCert;

    /**
     * 测试加密公钥证书
     */
    @ApiModelProperty(value = "测试加密公钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testPublicEncryptCert;

    /**
     * 签名私钥证书
     */
    @ApiModelProperty(value = "签名私钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String privateSignCert;

    /**
     * 加密私钥证书
     */
    @ApiModelProperty(value = "加密私钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String privateEncyptCert;

    /**
     * 测试签名私钥证书
     */
    @ApiModelProperty(value = "测试签名私钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testPrivateSignCert;

    /**
     * 测试加密私钥证书
     */
    @ApiModelProperty(value = "测试加密私钥证书")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String testPrivateEncryptCert;
    /**
     * 安全认证类型
     */
    @ApiModelProperty(value = "安全认证类型")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String safeType;
    /**
     * 加密类型
     */
    @ApiModelProperty(value = "加密类型")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String authType;
    /**
     * 是否脱敏
     */
    @ApiModelProperty(value = "是否脱敏")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String isEnable;
}
